//
//  UIBarButton+Extension.swift
//  SingWeibo
//
//  Created by shiying on 15/12/20.
//  Copyright © 2015年 shiying. All rights reserved.
//

import UIKit

extension UIBarButtonItem {

    //MARK: - 自定义导航栏button
    convenience init(imageName: String) {
        let button = UIButton()
        
        button.setBackgroundImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        button.setBackgroundImage(UIImage(named: "\(imageName)_highlighted"), forState: UIControlState.Highlighted)
        button.sizeToFit()
        self.init(customView: button)
        
    }







}